<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="zh">
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="../css/bootstrap-icons.css">
    <link rel="stylesheet" href="../css/bootstrap.min.css">
    <link rel="stylesheet" href="../css/bootstrap-admin.min.css">
    <link rel="stylesheet" href="../css/style.css">
    <title>个人信息主页</title>
</head>
<body onload="checkForm()">
<div class="bsa-main-wrapper">
    <div class="bsa-main-content">
        <div class="card border-0 shadow-sm">
            <div class="card-body p-4">
                <div class="row">
                    <div class="col-lg-8">
                        <div class="card">
                            <div class="card-body">
                                <form action="/client/update" id="form2" method="post">
                                    <div class="mb-3 row">
                                        <label for="username" class="col-sm-3 col-form-label">用户名</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control" id="username"  name="username" disabled
                                                   value="<c:out value="${user.username}" />">
                                        </div>
                                    </div>
                                    <div class="mb-3 row">
                                        <label for="phone" class="col-sm-3 col-form-label">手机号</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control" id="phone" name="phone"
                                                   value="<c:out value="${user.phoneNum}" />">
                                        </div>
                                    </div>
                                    <div class="mb-3 row">
                                        <label for="password" class="col-sm-3 col-form-label">密码</label>
                                        <div class="col-sm-9">
                                            <input type="text" class="form-control" id="password" name="password"
                                                   value="<c:out value="${user.password}" />">
                                        </div>
                                    </div>
                                    <div class="mb-3 row">
                                        <div class="col-sm-9 offset-sm-3">
                                            <input type="submit" class="btn btn-primary" value="保存更改">
                                        </div>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-4">
                        <div class="card">
                            <div class="card-body">
                                <div class="d-flex flex-column align-items-center text-center">
                                    <img src="<c:url value="../img/img_1.png"/>" alt="User" class="rounded-circle p-1 bsa-bg-color4 bsa-width-100">
                                    <div class="mt-3">
                                        <h4><c:out value="${user.username}" /></h4>
                                        <p class="text-muted font-size-sm">Web 开发小组</p>
                                    </div>
                                </div>
                                <hr class="my-4">
                                <ul class="list-group list-group-flush">
                                    <li class="list-group-item d-flex justify-content-between align-items-center flex-wrap">
                                        <a class="text-secondary" href="https://gitee.com/liu-Carrot/questionnaire-system" style="color: #0a53be">gitee仓库地址</a>
                                    </li>
                                </ul>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    function checkForm() {
        var flag = '<%=request.getAttribute("message")%>';
        if(flag != "null") {
            alert(flag);
        }
    }
</script>
<script src="../js/bootstrap.bundle.js"></script>
<script src="../js/bootstrap-admin.min.js"></script>
</body>
</html>
